package com.sean.designpatterns.structure.adaptor;

public class AudioPlayer implements MediaPlayer {
    @Override
    public void play(String mediaType, String fileName) {
        if(mediaType.equals("mp3")){
            System.out.println("mp3  "+fileName);
        }else if(mediaType.equals("mp4")||mediaType.equals("vlc")){
            new MediaAdapter(mediaType).play(mediaType,fileName);
        }else{
            System.out.println("format is not supported");
        }
    }
}
